Keir Fraser [Thu, 9 Oct 2008 09:15:30 +0000 (10:15 +0100)]
x86/mm: Use l1e_get_pfn() in destroy_grant_pte_mapping().
On x86_64 system, (pte >> PAGE_SHIFT) is not always equal to page
frame number because high bits (63:52) of pte may be used as
flags. This patch corrects the conversion and errors as below
disappear when applied.
(XEN) mm.c:3074:d0 PTE entry 200000a2ec6167 for address a1f09958
doesn't match frame a2ec6
Keir Fraser [Fri, 3 Oct 2008 08:42:11 +0000 (09:42 +0100)]
pygrub: fix the parameter `default' and `timeout' in elilo.conf
This patch fixes two issues related to the parameter `default' and
`timeout' in elilo.conf:
- LiloConf.py cannot interpret the parameter `default' and
`timeout'. The first kernel always boot up even if the second kernel
is specified by `default'. And `timeout' is ignored.
This issue is introduced by cset 15953:70bb28b62ffb.
- If two kernels or more are installed, the last kernel cannot boot
up even if it is specified by `default'.
Keir Fraser [Fri, 3 Oct 2008 08:37:35 +0000 (09:37 +0100)]
xend: Allow guest write access to /local/domain/x/memory
Required for xenballoond, and tools do not need to trust any values
written in that subdirectory.
Keir Fraser [Thu, 2 Oct 2008 11:56:55 +0000 (12:56 +0100)]
libblktap: Remove trailing null byte in xs_printf
xs_printf writes the terminating null byte of the passed string to
Xenstore. When reading, the null byte is returned in the following
form which confuses tools:
sector-size = "512\000"
This patch removes the null byte from the data to write.
Keir Fraser [Thu, 2 Oct 2008 09:37:28 +0000 (10:37 +0100)]
xend: Make only selected subdirs of /local/domain/<domid> writable by the guest.
This protects critical data like
/local/domain/<domid>/console/{tty,limit}. It also means we can trust
.../vm, and hence do not need /vm_path. Various parts of the previous
two changesets disappear.
Keir Fraser [Wed, 1 Oct 2008 12:35:39 +0000 (13:35 +0100)]
xend: Move some backend configuration info.
This patch moves some dom0 variables and backend device
configuration from frontend directories to
/local/domain/<backdomid>/backend or /vm.
Also,
- /vm_path/<domid> is introduced, referencing the /vm path
- /vm_path/device/backend holds the backend device location,
rather than storing it in the frontend directory
CPUIDLE: Initialize timer broadcast mechanism for C2
Without this patch, while running on platforms on which the deepest
C-state is C2, acpi_processor_idle fns will call into NULL
function. This has been the case since 18518:e61c7833dc9d8.
hvm: Default timer_mode=1 (do not delay virtual time for missed
ticks). Most guests prefer this mode compared with screwing with
progress of virtual time.
X86 and IA64: Rebase cpufreq logic for supporting both x86 and ia64
arch
Rebase cpufreq logic for supporting both x86 and ia64 arch:
1. move cpufreq arch-independent logic into common dir
(xen/drivers/acpi
and xen/drivers/cpufreq dir);
2. leave cpufreq x86-dependent logic at xen/arch/x86/acpi/cpufreq dir;
Signed-off-by: Yu, Ke <ke.yu@intel.com> Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com>
vtd: Fix check for interrupt remapping of ioapic RTE
For IOAPIC interrupt remapping, it only needs to remap ioapci RTE,
should not remap other IOAPIC registers, which are IOAPIC ID, VERSION
and Arbitration ID. This patch adds the check for this and only remap
ioapci RTE.
Signed-off-by: Anthony Xu <anthony.xu@intel.com> Signed-off-by: Weidong Han <weidong.han@intel.com> Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
In xm start the --vncviewer option has no effect, instead -c tries to
both connect to the console and start vncviewer. Additionally, to
start vncviewer it uses the domid variable which is only defined a few
lines later. Thus xm start -c doesn't work at all.
guest_physmap_add_entry() checks to see if the given mfn and gpfn
range in the p2m and m2p tables is already mapped before overwriting
the maps, and attempts to do something reasonable so that we don't
have any "dangling" pointers.
Unfortunately, these checks got broken when the page_order argument
was added. Each individual p2m and m2p entry needs to be checked, not
just the first page in a page order.
Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
Since Linux started to use one of the 3 low available bits, _PAGE_IO
needed to be moved to a different one. Not remembering about
_PAGE_GNTTAB in debug hypervisors, I ended up assigning it to the same
bit, which made the kernel fail on the debug hypervisor. However,
rather than fixing the kernel it seems more appropriate for the
hypervisor to stay away from these bits, not the least because its
definition was anyway accompanied by a warning that this may be
incompatible with certain OSes.
While obviously the hypervisor has to use some bit (and it's therefore
unavoidable that there's some risk of collision), using one of the
high available bits seems to be the better choice over using one of
the three low ones. Since in 32-bit mode these bits are reserved, the
patch disables the functionality here. The only reasonable alternative
I would see is to disable the functionality by default, but add a
command line option to specify which bit to use.
XENLOG_G_* should not be used in invocations of gdprintk().
Also change the wording in a few places and consistently print the
target domain. It remains questionable whether the code should be this
verbose in the first place, especially now that MSI is on by default.
ia64: fix make install under tools/debugger/xenitp
This patch fixes the following error with make install under
the directory, tools/debugger/xenitp by checking whether
the variable is length zero string.
XEN_DOMCTL_setvcpucontext, XEN_DOMCTL_max_vcpus, and
XEN_DOMCTL_setdebugging don't seem to allow Dom0 as the subject domain
(based on the criteria that they pause that domain in order to do
their job).
Signed-off-by: Jan Beulich <jbeulich@novell.com> Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
The major issue with supporting a significantly larger number of
physical CPUs appears to be the use of per-CPU GDT entries - at
present, x86-64 could support only up to 126 CPUs (with code changes
to also use the top-most GDT page, that would be 254). Instead of
trying to go with incremental steps here, by converting the GDT itself
to be per-CPU, limitations in that respect go away entirely.
ACPI C2 is quite possible mapped to CPU C3 or deeper state, so
thinking from worst cases, enable C3 like entry/exit handling for C2
by default. Option 'lapic_timer_c2_ok' can be used to select simple C2
entry/exit only if the user make sure that LAPIC tmr & TSC will not be
stop during C2.
There may be multiple ACPI C3 states reported by BIOS. Those C3 states
may be different on latency & power. So made some modification to
support this case.
xm list: Return unique exit code for non-existent domain
This patch will make xm return a exit code of 3 if `xm list
<non_existant_domain>` is done rather than the generic code of 1. I
used 3 because XendClient had a macro setup pointing
ERROR_INVALID_DOMAIN to 3.
x86, amd, hvm: pass through one more cpuid cache description leaf
Add a missing CPUID leaf that contains AMD-specific cache info.
Without this, Windows can spin trying to prefetch memory buffers using
a stride length of zero.
Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com> Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
x86: Allow continue_hypercall_on_cpu() to be called from within an
existing continuation handler. This fix is needed for the new method
of microcode re-programming.
details:
Since 21dd1fdb73d8 there have been (as far as I can see) three
separate mechanisms for achieving a VNC display:
1. xm spawns vncviewer after getting vnc display info
from qemu-dm via xenstore (introduced in 21dd1fdb73d8)
2. xm spawns vncviewer -listen and qemu-dm connects to it
3. qemu-dm spawns vncviewer (!)
The latter two are rather strange - No.3 is very strange indeed.
So I decided that rather than try to get No.2 or No.3 on track for
going into qemu upstream, No.2 and No.3 would be dropped.
After discussion on xen-devel the mechanism No.1 was introduced,
above.
No.1 is controlled by the --spawn-vncviewer (and --vncviewer-autopass)
command line options to xm, by analogy with the -c option.
Nos.2 and 3 are controlled by elements of the domain configuration
file - and their code still remains. So if you turn all of the vnc
options on you can get several vncviewers (although only one of them
will work).
This patch removes the support for the passive connection mode No.2
After all ioemu-remote will never connect to such a vncviewer.
The options to engage this functionality were already removed from
the example config files by Keir in 18241:bf4ef45e6a38.
x86-64: enforce memory limits imposed by virtual memory layout
... which currently means:
- The 1:1 map cannot deal with more than 1Tb.
- The m2p table can handle at most 8Tb.
- The page_info array can cover up to e.g. 1.6Gb (<=3D 64 CPUs) or
1Tb (193-256 CPUs).
x86: Simplify RDMSR pass-through emulation for certain
explicitly-named MSRs (but keep the names in the source code in case
we tighten up RDMSR emulation later).
Also add MSR_AMD_PATCHLEVEL MSR as explicitly required (for Solaris).
Replace the stubdom/ioemu link farm creation in stubdom/Makefile,
with code which arranges that:
* No symlinks are made for output files - in particular, any
symlinks for .d files would be written through by the compiler
and cause damage to the original tree and other strange
behaviours
* All subdirectories are made as local subdirectories rather than
links
* Any interrupted or half-completed creation of the link farm
leaves the directory in a state where the link farming will be
restarted
* We use make's inherent ability to test for the existence of files
rather than using [ -f ... ] at the start of the rule's commands
* The list of files to be excluded from the link farm can be
easily updated
etc.
This should fix some problems particularly with parallel builds,
or by-hand builds where directories are entered in other than the
usual order.
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Avoid parallel invocation of git for ioemu-remote.
The stubdom and tools directories both run `make ioemu-dir-find' in
tools. In a parallel build, both these invocations can run
concurrently because we're doing recursive make.
This change fixes this problem by adding a suitable dependencies in
the top-level Makefile for the recursion into tools/ and stubdom/,
ensuring that the git fetch happens once, first.
The bug was introduced in 18472/18474.
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
- This minor patch implements the missing stub function
security_label_to_details in the dummy module. This stub function is
necessary to create domains with network interfaces for modules that
do not implement the security_label_to_details function.
Signed-off-by: George Coker <gscoker@alpha.ncsc.mil>